package upload

import (
	"context"
)

type FileCfg struct {
	//File *os.File //文件源
	File []byte //文件源
	Name string //文件名
}

// UploadCfg ...
type UploadCfg struct {
	ossUrl       string //oss的地址
	accessKey    string //key
	accessSecret string //secret
	bucketName   string
	path         string
}

// Uploader ...
type Uploader interface {
	//Upload 上传文件
	Upload(ctx context.Context, fileCfg *FileCfg) (string, error)
	//Download 下载文件
	Download(ctx context.Context, fileCfg *FileCfg) ([]byte, error)
}
